﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using WMSADL.SY;
using WMSAML.SY;

namespace WMSABL.SY
{
    public class TGroup_BLL
    {
        TGroup_DAL dal = new TGroup_DAL();
        TGroupRoleRelation_BLL bll_TGroupRoleRelation = new TGroupRoleRelation_BLL();
        /// <summary>
        /// 增加数据
        /// </summary>
        public bool Add(TGroup_Entity entity)
        {
            if (dal.Add(entity)>0)
            {
                return true;
            }
            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        public bool Delete(int id)
        {
            return dal.Delete(id);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(TGroup_Entity entity)
        {
            return dal.Update(entity);
        }
        /// <summary>
        /// ByID
        /// </summary>
        public bool ExistsByID(int id)
        {
            return dal.ExistsByID(id);
        }

        /// <summary>
        /// ByName
        /// </summary>
        public bool ExistsByName(string group_name)
        {
            return dal.ExistsByName(group_name);
        }

        /// <summary>
        /// ByName
        /// </summary>
        /// <summary>
        public TGroup_Entity GetEntityByName(string group_name)
        {
            return dal.GetEntityByName(group_name);
        }

        /// <summary>
        /// ByID
        /// </summary>
        /// <summary>
        public TGroup_Entity GetEntityByID(int id)
        {
            return dal.GetEntityByID(id);
        }

    }
}
